package com.example.forum.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
@Data
@ApiModel
public class User {
    @ApiModelProperty("用户id")
    private Long id;

    @ApiModelProperty("用户名")
    private String username;
    @ApiModelProperty("密码")
    @JsonIgnore // 该注解制定类属性不参与序列化 : java对象 --> json字符串 就是序列化过程
    private String password;
    @ApiModelProperty("昵称")
    private String nickname;
    @ApiModelProperty("电话")
    private String phoneNum;
    @ApiModelProperty("邮箱")
    private String email;
    @ApiModelProperty("性别")
    private Byte gender;

    @JsonIgnore
    private String salt;

    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty("头像地址")
    private String avatarUrl;
    @ApiModelProperty("文章数")
    private Integer articleCount;
    @ApiModelProperty("是否是管理员")
    private Byte isAdmin;
    @ApiModelProperty("自我评论")
    private String remark;

    private Byte state;


    @JsonIgnore
    private Byte deleteState;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("修改时间")
    private Date updateTime;


}